<?php
class Gmail {
	function __construct(){
	
	}
	public function getMailBoxes($mailserver){
			$results =  array(
						array(
							'label' 	=> 'Gmail',
							'enable'	=> true,
							'mailbox' 	=> $mailserver,
							'username' 	=> $_SESSION["uname"],
							'password' 	=> $_SESSION["pass"]
						)
					);
			print_r($results);
			return $results;
	}
    // a function to decode MIME message header extensions and get the text
	public function decode_imap_text($str){
		$result = '';
		$decode_header = imap_mime_header_decode($str);
		foreach ($decode_header AS $obj) {
			$result .= htmlspecialchars(rtrim($obj->text, "\t"));
		}
		return $result;
	}
}
?>
